/**
 * @file   1079.cpp
 * @author Shuang Hu <hsmath@ubuntu>
 * @date   Sat Apr 10 22:55:18 2021
 * 
 * @brief  PAT advanced:Problem 1079,BFS
 * 
 * 
 */

#include<iostream>
#include<vector>
#include<cmath>
#include<iomanip>
using namespace std;
class Network{
private:
    vector<vector<int>> supplynet;
    int level[100005]={0};
    int supplynum[100005]={0};
    int business;//number of people;
    double price;//origin price;
    double rate;//add rate!
public:
    Network(int num,double price,double rate);
    void Levelorder_traverse();
    void print();
};
Network::Network(int num,double price,double rate){
    business=num;
    this->price=price;
    this->rate=rate;
    vector<int> a;
    for(int i=0;i<num;i++){//using adjacent table to store the graph
	int nodenum;
	cin>>nodenum;
	if(nodenum==0){
	    cin>>supplynum[i];//LEAF NODE!Input its supply number.
	}else{
	    for(int j=0;j<nodenum;j++){
		int node;
		cin>>node;
		a.push_back(node);
	    }
	}
	supplynet.push_back(a);
	a.clear();
    }
}
void Network::Levelorder_traverse(){
    int queue[100005]={0};
    int front,rear;
    front=rear=0;
    queue[rear++]=0;
    while(rear>front){
	int element=queue[front++];
	if(supplynet[element].size()==0){//LEAF NODE
	    continue;
	}else{
	    for(int i=0;i<supplynet[element].size();i++){
		queue[rear++]=supplynet[element][i];
		level[supplynet[element][i]]=level[element]+1;
	    }
	}
    }
}
void Network::print(){
    double finalprice=0;
    for(int i=0;i<business;i++){
	if(supplynum[i]){
	    finalprice=finalprice+supplynum[i]*price*pow((1+rate),level[i]);
	}
    }
    cout<<fixed<<setprecision(1)<<finalprice<<endl;
}
int main(){
    int n;
    double p,r;
    cin>>n>>p>>r;
    r=r/100;
    Network NET(n,p,r);
    NET.Levelorder_traverse();
    NET.print();
}
